import httpProxy from "../utils/request"; // 拿到我们刚封装的axios
import { URL } from "../config";
// 获取验证码
export async function getVerity(h: number, w: number) {
  return await httpProxy({
    // url: `/admin/base/open/captcha?height=${h}&width=${w}&color=%23efefef`,
    url: `/admin/base/open/captcha?height=${h}&width=${w}&color=%23FFDEAD`,
    method: "GET",
  });
}
export async function getFormUsers(data) {
  return await httpProxy({
    url: `/admin/base/sys/user/page`,
    method: "POST",
    data,
  });
}
export async function getUserDetail(data) {
  return await httpProxy({
    url: `/admin/base/sys/user/info`,
    method: "GET",
    params: data,
  });
}

export async function updateUser(data) {
  return await httpProxy({
    url: `/admin/base/sys/user/update`,
    method: "POST",
    data,
  });
}
export async function deleteUser(data) {
  return await httpProxy({
    url: `/admin/base/sys/user/delete`,
    method: "POST",
    data,
  });
}
export async function addUser(data) {
  return await httpProxy({
    url: `/admin/base/sys/user/add`,
    method: "POST",
    data,
  });
}
export async function moveDepartment(data) {
  return await httpProxy({
    url: `/admin/base/sys/user/move`,
    method: "POST",
    data,
  });
}
